#include "FCC300_OperFun.h"
#include "equ_include/humidity_temperature.h"
#include "equ_include/ECS_FCC300.h"

//请自行添加所需头文件
 FCC300_OperFun_INFO FCC300_OperFun_info;
 FCC300_OperFun_MA FCC300_OperFun_ma;
 QStandardItemModel FCC300_OperFun_mode_info;

 void FCC300_OperFun::Can0Data_pro(quint32 CANID,quint8 data[8])
 {

     switch (CANID)
     {
     case 0x1830A7D3:
         Humidity_temperature::EQ_0x1830A7D3(data);
         break;
     case 0x1831A7D3:
         Humidity_temperature::EQ_0x1831A7D3(data);
         break;
     case 0x1832A7D3:
         Humidity_temperature::EQ_0x1832A7D3(data);
         break;
     case 0x1833A7D3:
         Humidity_temperature::EQ_0x1833A7D3(data);
         break;
     case 0x1834A7D3:
         Humidity_temperature::EQ_0x1834A7D3(data);
         break;
     case 0x1835A7D3:
         Humidity_temperature::EQ_0x1835A7D3(data);
         break;
     case 0x1836A7D3:
         Humidity_temperature::EQ_0x1836A7D3(data);
         break;
     case 0x1837A7D3:
         Humidity_temperature::EQ_0x1837A7D3(data);
         break;
     case 0x1820A7C1:
         ECS_FCC300::EQ_0x1820A7C1(data);
         break;
     case 0x1821A7C1:
         ECS_FCC300::EQ_0x1821A7C1(data);
         break;
     case 0x182FA7C1:
         ECS_FCC300::EQ_0x182FA7C1(data);
         break;
     case 0x18F002B2:
         ECS_FCC300::EQ_0x18F002B2(data);
         break;
     }
}


void FCC300_OperFun::Can1Data_pro(quint32 CANID,quint8 data[8])
{
    switch (CANID)
    {
    case 0x1830A7D3:
        Humidity_temperature::EQ_0x1830A7D3(data);
        break;
    case 0x1831A7D3:
        Humidity_temperature::EQ_0x1831A7D3(data);
        break;
    case 0x1832A7D3:
        Humidity_temperature::EQ_0x1832A7D3(data);
        break;
    case 0x1833A7D3:
        Humidity_temperature::EQ_0x1833A7D3(data);
        break;
    case 0x1834A7D3:
        Humidity_temperature::EQ_0x1834A7D3(data);
        break;
    case 0x1835A7D3:
        Humidity_temperature::EQ_0x1835A7D3(data);
        break;
    case 0x1836A7D3:
        Humidity_temperature::EQ_0x1836A7D3(data);
        break;
    case 0x1837A7D3:
        Humidity_temperature::EQ_0x1837A7D3(data);
        break;
    case 0x1820A7C1:
        ECS_FCC300::EQ_0x1820A7C1(data);
        break;
    case 0x1821A7C1:
        ECS_FCC300::EQ_0x1821A7C1(data);
        break;
    case 0x182FA7C1:
        ECS_FCC300::EQ_0x182FA7C1(data);
        break;
    case 0x18F002B2:
        ECS_FCC300::EQ_0x18F002B2(data);
        break;

    }

}




void FCC300_OperFun::RunDataProForm()
{


}
float FCC300_OperFun::PressureSensor_Count(quint16 price,float X_L,float X_H,float Y_L,float Y_H)   //输入量:price，需要值Y,X_L: Y_L的X数据,X_H:Y_H的X数据,Y_L:最小转换Y数据,Y H:最大转换Y数据:
{
      return    ((price-X_L)/(X_H-X_L))*(Y_H-Y_L)+Y_L;



}
float FCC300_OperFun::flowmeter_Count(quint16 price,float ratio)  //price为值,ratio仪表的流量系数
{

        return (price*60)/ratio;


}
void FCC300_OperFun::rest_data_info()  //信息参数复位
{

}
void FCC300_OperFun::Fault_processing()  //故障处理
{

}
void FCC300_OperFun::EQ_runinfo()
 {
}
